﻿using System;
using System.Globalization;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace mForum.Web.Common.ViewDataModel
{
    using mForum.Core.Attributes;
    using mForum.Resources.Views;

    [PropertiesMustMatch("Password", "ConfirmPassword", ErrorMessage = "The password and confirmation password do not match.")]
    public class RegisterViewData : AccountViewData
    {
            public int MinPasswordLength { get; set; }

            [Required]
            [DisplayName("Username")]
            public string UserName { get; set; }

            [Required]
            [DataType(DataType.EmailAddress)]
            [DisplayName("Email")]
            public string Email { get; set; }

            [Required]
            [ValidatePasswordLength]
            [DataType(DataType.Password)]
            [DisplayName("Password")]
            public string Password { get; set; }

            [Required]
            [DataType(DataType.Password)]
            [DisplayName("ConfirmPassword")]
            public string ConfirmPassword { get; set; }

            [Required]
            [DisplayName("Password Question")]
            public string PasswordQuestion { get; set; }

            [Required]
            [DisplayName("Password Answer")]
            public string PasswordAnswer { get; set; }
    }
}
